
import { CoordTransform } from '../../../utils/CoordTransform'
import { BaseEntity } from './BaseEntity'

export class BasePointEntity extends BaseEntity {
  constructor(options = {}) {
    super(options)

    if (options.position) {
      this.position = options.position
    }
  }

  get position() {
    return this._position
  }

  set position(position) {
    this._position = CoordTransform.lonlat2cartesian(position)
    if (this._entity) {
      this._entity.position = this._position
    }
  }

}